<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<h:head>  
  		
    </h:head> 
	
<h:body>
<ui:composition template="/WEB-INF/templates/templateMain.xhtml">
	<ui:define name="content">
	    <p:panel>
<h:form id="form">
    <p:dataTable var="item" value="#{cadastroDeExameBean.dadosDeExameEmGrade}" id="dadosExame" editable="true">

        <f:facet name="header">
            Dados Do Exame
        </f:facet>

        <p:column headerText="Parametros" style="width:125px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{item.DADOS_GRADE_PARAMETRO}" />
                </f:facet>
                <f:facet name="input">
                    <p:inputText value="#{item.DADOS_GRADE_PARAMETRO}" style="width:100%"/>
                </f:facet>
            </p:cellEditor>
        </p:column>

        <p:column headerText="Unidade" style="width:125px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{item.DADOS_GRADE_UNIDADE}" />
                </f:facet>
                <f:facet name="input">
                    <p:inputText value="#{item.DADOS_GRADE_UNIDADE}" style="width:100%" label="Year"/>
                </f:facet>
            </p:cellEditor>
        </p:column>
        
        <p:column headerText="Valor de referência" style="width:125px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{item.DADOS_GRADE_REFERENCIA}" />
                </f:facet>
                <f:facet name="input">
                    <p:inputText value="#{item.DADOS_GRADE_REFERENCIA}" style="width:100%" label="Year"/>
                </f:facet>
            </p:cellEditor>
        </p:column>
 

        <p:column headerText="Editar" style="width:50px">
            <p:rowEditor />
        </p:column>

    </p:dataTable>
   <h:commandButton value="Gravar" action="#{cadastroDeExameBean.gravarDadosDoExame}"></h:commandButton>
   <h:commandButton value="Voltar" action="#{cadastroDeExameBean.listarExames}"></h:commandButton>
</h:form>
</p:panel>
	</ui:define>
</ui:composition>
</h:body>
</html>